import { withInstall } from '@ibiz-template/vue3-util';
import { App } from 'vue';
import { registerViewProvider } from '@ibiz-template/runtime';
import { ViewProvider } from './view.provider';
import { View } from './view';
import { IBizViewEngine } from '../../view-engine';

export { ViewProvider };

export const IBizView = withInstall(View, function (v: App) {
  v.use(IBizViewEngine);
  v.component(View.name, View);
  registerViewProvider('DEFAULT', () => new ViewProvider());
});
